// Created by Xslt generator for Eclipse.
// XSL :  not found (java.io.FileNotFoundException:  (The system cannot find the path specified))
// Default XSL used : easystruts.jar$org.easystruts.xslgen.JavaClass.xsl

package com.ba360.struts.form;

import javax.servlet.http.HttpServletRequest;

import org.apache.struts.action.ActionError;
import org.apache.struts.action.ActionErrors;
import org.apache.struts.action.ActionForm;
import org.apache.struts.action.ActionMapping;

/**
 * SearchClassifiedsForm.java created by EasyStruts - XsltGen.
 * http://easystruts.sf.net created on 05-06-2004
 * 
 * XDoclet definition:
 * 
 * @struts:form name="SearchClassifiedsForm"
 */
public class SearchClassifiedsForm extends ActionForm {

	// --------------------------------------------------------- Instance
	// Variables

	/** subCategoryID property */
	private String subCategoryID;

	/** priceMax property */
	private String priceMax;

	/** parentCategoryId property */
	private String parentCategoryId;

	/** priceMin property */
	private String priceMin;

	/** adContent property */
	private String adContent;

	/** cityId property */
	private String cityId;
	
	private String excludeSearchContent;

	private String city;

	/** Listings with Pics */
	private String listPict;
	// --------------------------------------------------------- Methods

	/**
	 * Method validate
	 * 
	 * @param ActionMapping
	 *            mapping
	 * @param HttpServletRequest
	 *            request
	 * @return ActionErrors
	 */
	public ActionErrors validate(ActionMapping mapping,
			HttpServletRequest request) {

		ActionErrors ae = new ActionErrors();
		parentCategoryId = request.getParameter("PostingType");		
		subCategoryID = request.getParameter("CatType");
		cityId = request.getParameter("City");		
		adContent = request.getParameter("adContent");		
		priceMin = request.getParameter("pricemin");
				
		if (priceMin!=null){
		try{
		int pricemin = Integer.parseInt(this.priceMin);
		}catch(Exception e)
		{
			ae.add("PriceMin",new ActionError("PriceMinFormatError"));
			return ae;
		}}
		priceMax = request.getParameter("pricemax");
		if (priceMax!=null){
		try{
			int pricemax = Integer.parseInt(this.priceMax);
			}catch(Exception e)
			{
				ae.add("PriceMax",new ActionError("PriceMaxFormatError"));
				return ae;
			}
		}
		listPict = request.getParameter("listPict");
		return ae;
		//throw new UnsupportedOperationException("Generated method
		// 'validate(...)' not implemented.");
	}

	/**
	 * Method reset
	 * 
	 * @param ActionMapping
	 *            mapping
	 * @param HttpServletRequest
	 *            request
	 */
	public void reset(ActionMapping mapping, HttpServletRequest request) {
		/*
		 * subCategoryID = ""; mainLocationId = ""; priceMax = "";
		 * parentCategoryId = ""; priceMin = ""; adContent = ""; cityId = "";
		 */

	}

	/**
	 * Returns the subCategoryID.
	 * 
	 * @return String
	 */
	public String getSubCategoryID() {
		return subCategoryID;
	}

	/**
	 * Set the subCategoryID.
	 * 
	 * @param subCategoryID
	 *            The subCategoryID to set
	 */
	public void setSubCategoryID(String subCategoryID) {
		this.subCategoryID = subCategoryID;
	}

	/**
	 * Returns the priceMax.
	 * 
	 * @return String
	 */
	public String getPriceMax() {
		return priceMax;
	}

	/**
	 * Set the priceMax.
	 * 
	 * @param priceMax
	 *            The priceMax to set
	 */
	public void setPriceMax(String priceMax) {
		this.priceMax = priceMax;
	}

	/**
	 * Returns the parentCategoryId.
	 * 
	 * @return String
	 */
	public String getParentCategoryId() {
		return parentCategoryId;
	}

	/**
	 * Set the parentCategoryId.
	 * 
	 * @param parentCategoryId
	 *            The parentCategoryId to set
	 */
	public void setParentCategoryId(String parentCategoryId) {
		this.parentCategoryId = parentCategoryId;
	}

	/**
	 * Returns the priceMin.
	 * 
	 * @return String
	 */
	public String getPriceMin() {
		return priceMin;
	}

	/**
	 * Set the priceMin.
	 * 
	 * @param priceMin
	 *            The priceMin to set
	 */
	public void setPriceMin(String priceMin) {
		this.priceMin = priceMin;
	}

	/**
	 * Returns the adContent.
	 * 
	 * @return String
	 */
	public String getAdContent() {
		return adContent;
	}

	/**
	 * Set the adContent.
	 * 
	 * @param adContent
	 *            The adContent to set
	 */
	public void setAdContent(String adContent) {
		this.adContent = adContent;
	}

	/**
	 * Returns the cityId.
	 * 
	 * @return String
	 */
	public String getCityId() {
		return cityId;
	}

	/**
	 * Set the cityId.
	 * 
	 * @param cityId
	 *            The cityId to set
	 */
	public void setCityId(String cityId) {
		this.cityId = cityId;
	}
	
	public String getExcludeSearchContent()
	{
		return excludeSearchContent;
	}
	
	public void setExcludeSearchContent(String exs)
	{
		this.excludeSearchContent = exs;
	}

	public String getListPict() {
		return listPict;
	}

	public void setListPict(String listPict) {
		this.listPict = listPict;
	}

	public String getCity() {
		return city;
	}

	public void setCity(String city) {
		this.city = city;
	}
}